<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>修改权限</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/common.css" media="all">
    <script src="${pageContext.request.contextPath}/static/css/layui/layui.js"></script>
    <script src="${pageContext.request.contextPath}/static/jquery/jquery-1.12.4.js"></script>
</head>
<body>
<form class="layui-form" action="${pageContext.request.contextPath}/back/author/permission/modify" method="post">
    <div class="form_body">
        <input type="hidden" id="roleId" name="roleId" value="${roleId}">
        <div class="layui-form-item">
            <label class="layui-form-label">职位名称:</label>
            <div class="layui-input-block" style="width: 50%;">
                <input type="text" readonly name="roleName" value="${roleName}" autocomplete="off" class="layui-input">
            </div>
        </div>
        <c:forEach var="permissionList" items="${permissions}" >
        <div class="layui-form-item">
            <label class="layui-form-label">${permissionList.key}:</label>
            <div class="layui-input-block">
                <c:forEach var="per" items="${permissionList.value}">
                    <input type="checkbox" name="permissionIds" readonly value="${per.permissionId}" title="${per.permission}" ${per.checked?'checked':''}>
                </c:forEach>
            </div>
        </div>
        </c:forEach>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit="" lay-filter="check">提交修改</button>
            </div>
        </div>
    </div>
</form>
<script>
    layui.use('form',function () {
       var form=layui.form;

       form.render();
        form.on('submit(check)', function(data){
            return true;
        });
    });
</script>
</body>
</html>
